<script setup>
import {useUserStore} from "@/store/modules/user.js";
import {getUser} from "@/api/user.js";

const userStore = useUserStore()

const saveUser = () => {
  getUser().then(res => {
    console.log(res)
  })
  userStore.login({
    name: '老王',
    age: 18
  },'112kjkljsdaklfjsadf')

  console.log(userStore.user)
}

</script>

<template>
  <h1>index page</h1>
  <button @click="saveUser">save</button>
  <router-link to="about">1111</router-link>
</template>

<style scoped>

</style>